package edu.gatech.information;

import static org.junit.Assert.*;

import org.junit.Test;

public class PlayerTest {
	public PlayerTest(){}
	@Test
	public void canAddFuelTest() {
		Player p= new Player();
		Planet pl= new Planet();
		MarketPlace m= pl.getMarketplace();
		Ship s= p.getShip();
		s.setCurrentFuel(0);
		boolean expResult = true;
        boolean result = p.addFuel(m);
        assertEquals(expResult, result);
	}
	@Test
	public void canNotAddFuelTest() {
		Player p= new Player();
		Planet pl= new Planet();
		MarketPlace m= pl.getMarketplace();
		Ship s= p.getShip();
		s.setCurrentFuel(s.getFuelLevel()+1);
		boolean expResult = false;
        boolean result = p.addFuel(m);
        assertEquals(expResult, result);
	}
	@Test
	public void canRemoveFuelTest() {
		Player p= new Player();
		Planet pl= new Planet();
		MarketPlace m= pl.getMarketplace();
		Ship s= p.getShip();
		s.setCurrentFuel(1);
		boolean expResult = true;
        boolean result = p.removeFuel(m);
        assertEquals(expResult, result);
	}
	@Test
	public void canNotRemoveFuelTest() {
		Player p= new Player();
		Planet pl= new Planet();
		MarketPlace m= pl.getMarketplace();
		Ship s= p.getShip();
		s.setCurrentFuel(0);
		boolean expResult = false;
        boolean result = p.removeFuel(m);
        assertEquals(expResult, result);
	}

}
